<extend name="Public:layout"/>
<block name="js">
    <script src="__STATIC__/plugin/plupload/plupload.full.min.js"></script>
    <script src="__STATIC__/plugin/qiniu.min.js"></script>
    <script type="text/javascript">
        var QINIU = $.parseJSON('{$qiniu|json_encode}');
    </script>
</block>
<block name="content">
    <div class="panel admin-panel">
        <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>编辑轮播</strong></div>
        <div style="height:30px;"></div>
        <div class="container-fluid">
            <form method="post" class="form-x ajax-submit" action="{:U('edit')}">
                <input type="hidden" name="slide_id" value="{$info.slide_id}">
                <div class="form-group">
                    <div class="col-lg-1 col-md-1 text-center">链接</div>
                    <div class="col-lg-3 col-md-3">
                        <input type="text" class="form-control" value="{$info.slide_url}" name="slide_url" placeholder="请输入链接地址">
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-lg-1 col-md-1 text-center">站点</div>
                    <div class="col-lg-3 col-md-3">
                        <select name="type" class="form-control">
                            <option value="1" <eq name="info.type" value="1">selected</eq>>PC</option>
                            <option value="2" <eq name="info.type" value="2">selected</eq>>手机</option>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-lg-1 col-md-1 text-center">状态</div>
                    <div class="col-lg-3 col-md-3">
                        <select name="status" class="form-control">
                            <option value="1">启用</option>
                            <option value="0" <?php if($info['status'] === '0') echo "selected"?>>禁用</option>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-lg-1 col-md-1 text-center">排序</div>
                    <div class="col-lg-3 col-md-3">
                        <input type="text" class="form-control" value="{$info.sort}" name="sort" placeholder="1 - 99 从小到大排序">
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-lg-1 col-md-1 text-center">图片</div>
                    <div class="col-lg-3 col-md-3">
                        <input type="hidden" name="slide_image" value="{$info.slide_image}">
                        <button type="button" class="btn btn-primary icon-upload upload" id="upload">上传图片</button>
                        <img src="{$info.slide_image}" class="preview-upload" style="display:block;max-width:300px;">
                    </div>
                </div>

                <div class="form-group">
                    <div class="label">
                        <label></label>
                    </div>
                    <div class="field">
                        <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</block>